package com.xxl.job.admin.service;

import com.xxl.job.core.biz.model.ReturnT;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

public interface DataCenterService {
    /**
     * export table to excel
     * @param id DBinfo id
     * @param tableName table's name
     * @return
     */
    ReturnT<String> exportToFile(HttpServletRequest request, Long id, String tableName, String sheetName);

    ReturnT<List<Map<String, Object>>> searchTableFields(Long id, String tableName);

    ReturnT<List<Map<String, Object>>> pageList(Long id, String tableName, int start, int length);

    /**
     * open file
     * @param filePath
     * @return
     */
    ReturnT<String> open(String filePath);

    /**
     *
     * @param filePath
     * @return
     */
    ReturnT<String> openDirectory(String filePath);
}
